package pATT.DataSetsGenerator.dataSetsGenerator.attribute.implement;

public class RealAttribute extends Attribute {
	
	private double transition;
	private double limitDown = 0;
	private double limitUp = 0;
	private boolean weight = false;
	private double weightPercent;
	private String weightValue;
	
	public RealAttribute(boolean null1, String name, String type, double down, double up, double transition) {
		super(null1, name, type);
		limitDown = down;
		limitUp = up;
		this.transition = transition;
		recoveryValues();
	}
	
	@SuppressWarnings("unchecked")
	protected void recoveryValues() {
		System.out.println("LLego aca REAL: ");
		double i = getLimitDown();
		while(i < getLimitUp()){ 
			values.add(String.valueOf(i));
			System.out.println("-->REal: "+String.valueOf(i));
			i+= transition;
		}
	}
	
	public void setNewLimits(double limitDown,double limitUp,double trans){
		this.limitDown = limitDown;
		this.limitUp = limitUp;
		this.transition = trans; 
		values.removeAllElements();
		recoveryValues();
	}
	
	public double getTransition() {
		return transition;
	}
	
	public void setTransition(double transition) {
		this.transition = transition;
	}
	
	public double getLimitDown() {
		return limitDown;
	}
	
	public void setLimitDown(double limitDown) {
		this.limitDown = limitDown;
	}
	
	public double getLimitUp() {
		return limitUp;
	}
	
	public void setLimitUp(double limitUp) {
		this.limitUp = limitUp;
	}
	
	public boolean isWeight() {
		return weight;
	}
	
	public double getWeightPercent() {
		return weightPercent;
	}
	
	public String getWeightValue() {
		return weightValue;
	}
	
	
}
